<script lang="ts" setup>
import { reactive, ref } from "vue";
import {
  Delete,
  Edit,
  Search,
  Share,
  Upload,
  ArrowLeft,
} from "@element-plus/icons-vue";
const tableData = [
  {
    date: '2016-05-03',
    name: 'Tom',
    address: 'No. 189, Grove St, Los Angeles',
    allTotal:"2000"
  }
]
</script>

<template>
  <div>
    <el-row>
      <el-col :span="24">
        <div class="back">
          <el-button plain class="backMove"
            ><el-icon><ArrowLeft /></el-icon>返回</el-button
          >
        </div>
      </el-col>
    </el-row>

    <el-row>
      <el-col :span="24">
        <div class="detailTitle">
          <div>
            <span class="head">订单详情</span>
            <span class="state">待付款</span>
          </div>
          <div class="btnGroup">
            <el-button type="warning">设为已付款</el-button>
            <el-button type="primary">设为已发货</el-button>
            <el-button type="success">设为已完成</el-button>
            <el-button type="danger">设为已取消</el-button>
          </div>
        </div>
      </el-col>
    </el-row>

    <el-divider />

    <div class="content">
      <div class="contentTop">
        <p class="textTit">基本信息</p>
      </div>
      <div class="contentBody">
        <div class="contentLeft">
          <div class="item">
            <div class="shopNo">
              <span>订单号:</span>
            </div>
            <div class="noShop">
              <span>5112312</span>
            </div>
          </div>
          <div class="item">
            <div class="shopNo">
              <span>订单总金额:</span>
            </div>
            <div class="noShop">
              <span> ¥ 10,000.00</span>
            </div>
          </div>
          <div class="item">
            <div class="shopNo">
              <span>付款方式:</span>
            </div>
            <div class="noShop">
              <span>微信支付</span>
            </div>
          </div>
          <div class="item">
            <div class="shopNo">
              <span>客户:</span>
            </div>
            <div class="noShop">
              <span>小弟</span>
            </div>
          </div>
          <div class="item">
            <div class="shopNo">
              <span>下单日期:</span>
            </div>
            <div class="noShop">
              <span>2020-06-27 18:56:44</span>
            </div>
          </div>
          <div class="item">
            <div class="shopNo">
              <span>付款时间:</span>
            </div>
            <div class="noShop">
              <span>-</span>
            </div>
          </div>
          <div class="item">
            <div class="shopNo">
              <span>发货时间:</span>
            </div>
            <div class="noShop">
              <span>-</span>
            </div>
          </div>
        </div>
        <div class="contentRight">
          <div class="item">
            <div class="shopNo">
              <span>收货人:</span>
            </div>
            <div class="noShop">
              <span>小弟</span>
            </div>
          </div>
          <div class="item">
            <div class="shopNo">
              <span>收货地址:</span>
            </div>
            <div class="noShop">
              <span>[福建 福州 台江区] 台江区鳌峰路2号</span>
            </div>
          </div>
          <div class="item">
            <div class="shopNo">
              <span>收货手机:</span>
            </div>
            <div class="noShop">
              <span>15911111111</span>
            </div>
          </div>
          <div class="item">
            <div class="shopNo">
              <span>收货电话:</span>
            </div>
            <div class="noShop">
              <span>0591-12345678</span>
            </div>
          </div>
          <div class="item">
            <div class="shopNo">
              <span>物流信息:</span>
            </div>
            <div class="noShop">
              <span>-</span>
            </div>
          </div>
          <div class="item">
            <div class="shopNo">
              <span>订单备注:</span>
            </div>
            <div class="noShop">
              <span>-</span>
            </div>
          </div>
          <div class="item">
            <div class="shopNo">
              <span>订单类型:</span>
            </div>
            <div class="noShop">
              <span>实物订单</span>
            </div>
          </div>
        </div>
      </div>
    </div>

    <div class="content2">
      <div class="contentTop2">
        <p class="textTit">商品信息</p>
      </div>

      <div class="contentBody">
        <el-table :data="tableData" border style="width: 100%" table-layout="fixed">
          <el-table-column prop="date" label="商品名称" width="300" align="center"/>
          <el-table-column prop="name" label="单价" width="260" align="center" />
          <el-table-column prop="address" label="数量" align="center"/>
          <el-table-column prop="allTotal" label="商品总价" align="center"/>
        </el-table>
      </div>

      <div class="bottomBox">
        <div class="bottomRight">
            <div class="bottom-item">
                <span>运费:</span>
                <span>￥0.00</span>
            </div>
            <div class="bottom-item">
                <span>优惠:</span>
                <span>￥0.00</span>
            </div>
            <div class="bottom-item">
                <span>订单金额:</span>
                <span>￥1180.00</span>
            </div>                        
        </div>
      </div>

    </div>

  </div>
</template>

<style scoped>
.back {
  overflow: hidden;
}
.backMove {
  float: right;
}
.head {
  font-size: 18px;
  font-weight: 700;
}
.detailTitle {
  border: 1px solid #e9e9e9;
  padding: 20px;
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.content {
  display: flex;
  flex-direction: column;
}
.state {
  margin-left: 30px;
}
.contentTop {
  background-color: #f2f2f2;
  width: 100%;
  height: 50px;
  border-top-right-radius: 15px;
  border-top-left-radius: 15px;
}
.textTit {
  font-size: 15px;
  font-weight: 700;
  line-height: 50px;
  margin-left: 10px;
}
.contentBody {
  width: 100%;
  border: 1px solid #e9e9e9;
  display: flex;
}
.item {
  display: flex;
  border: 1px solid #e9e9e9;
  height: 40px;
  width: 100%;
}
.contentLeft {
  width: 50%;
}
.contentRight {
  width: 50%;
}
.shopNo {
  width: 130px;
  display: flex;
  align-items: center;
  background-color: #f5f5f5;
  justify-content: center;
  border-right: 1px solid #e9e9e9;
  font-weight: bold;
}
.noShop {
  display: flex;
  align-items: center;
  margin-left: 10px;
  font-size: 14px;
}
.contentTop2 {
  background-color: #f2f2f2;
  width: 100%;
  height: 50px;
  border-top-right-radius: 15px;
  border-top-left-radius: 15px;
}
.content2 {
  display: flex;
  flex-direction: column;
  margin-top: 25px;
}
.bottomBox{
    display: flex;
    justify-content: flex-end;
    margin-top: 30px;
    margin-right: 10px;
}
.bottom-item{
    margin-top: 15px;
}
</style>
